package com.avic.rong.api.mine;

import com.avic.rong.api.HttpPostService;
import com.example.minato.minastore.BaseApi;
import com.example.minato.minastore.listener.HttpOnNextListener;
import com.trello.rxlifecycle2.components.support.RxAppCompatActivity;

import io.reactivex.Observable;
import retrofit2.Retrofit;

public class AccountBalanceApi extends BaseApi {

    private String token;
    private Integer pageNumber;
    private Integer pageSize;
    private Integer lastTime;

    public void setPageNumber(Integer pageNumber) {
        this.pageNumber = pageNumber;
    }

    public AccountBalanceApi(RxAppCompatActivity rxAppCompatActivity, HttpOnNextListener listener) {
        super(rxAppCompatActivity, listener);
    }


    public void setArgument(String token,Integer pageNumber,Integer pageSize,Integer lastTime){
        this.token = token;
        this.pageNumber = pageNumber;
        this.pageSize = pageSize;
        this.lastTime = lastTime;
    }

    @Override
    public Observable getObservable(Retrofit retrofit) {
        HttpPostService httpPostService = retrofit.create(HttpPostService.class);
        return httpPostService.accountBalance(token,pageNumber,pageSize,lastTime);
    }

}
